package cn.e4j.modular.system.service;

import cn.e4j.core.dto.impl.Dto;
import cn.e4j.modular.system.entity.SysTask;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.quartz.SchedulerException;

import java.text.ParseException;
import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wenchuan.li
 * @since 2018-12-13
 */
public interface SysTaskService extends IService<SysTask> {

    List<SysTask> getListData(Page<Object> page, Dto dto);

    void addData(SysTask sysTask);

    void editData(SysTask sysTask);

    void deleteData(SysTask sysTask);

    void deleteDataBatch(List<SysTask> sysTaskList);

    List<SysTask> initTask(Dto inDto) throws SchedulerException, ParseException, ClassNotFoundException;

    void runTask(SysTask sysTask) throws SchedulerException, ParseException, ClassNotFoundException;

    void stopTask(SysTask sysTask) throws SchedulerException;

    void runTaskOnce(SysTask sysTask, Dto inDto) throws SchedulerException, ParseException, ClassNotFoundException;

    List<String> lastFiveTimes(String cron) throws ParseException;

}
